<!-- 插槽组件 -->
<script setup>
    defineProps(['title','link']);
</script>
<template>
<!-- 内容 -->
    <div class="card">
        <div class="title">
            <span></span>
            <span>{{ title }}</span>
            <span>{{ link }}</span>
        </div>
        <div class="content">
            <slot>暂无内容</slot>
        </div>
    </div>
</template>
<style scoped>
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-size: 14px; */
}
.card{
    width: 100%;
}
.title{
    display: flex;
    align-items: center;
    gap: 5px;
    height: 50px;
    line-height: 50px;
}
.title>span:nth-child(1){
    width: 5px;
    height: 16px;
    background-color: #3a9;
    border-radius: 5px;
}
.title>span:nth-child(2){
    flex: 1;
    font-size: 18px;
    font-weight: bold;
}
.title>span:nth-child(3){
    color: #3a9;
}
.content{
    box-shadow: 0 0 5px #ccc;
    border-radius: 10px;
    padding: 10px;
    background-color: white;
    min-height: 100px;
}
</style>